package org.zwy.gradetrack.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.zwy.gradetrack.entity.CourseSupportMatrix;
import java.math.BigDecimal;
import java.util.List;

/**
 * 课程支撑矩阵Mapper接口
 */
@Mapper
public interface CourseSupportMatrixMapper extends BaseMapper<CourseSupportMatrix> {
    
    @Select("SELECT weight FROM course_support_matrix " +
            "WHERE course_id = #{courseId} AND indicator_id = #{indicatorId}")
    BigDecimal getSupportWeight(Integer courseId, Integer indicatorId);

    @Select("SELECT * FROM course_support_matrix WHERE course_id = #{courseId}")
    List<CourseSupportMatrix> getSupportMatrixByCourseId(@Param("courseId") Integer courseId);
}